<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

global $title,$current_screen,$parent_file;
$title='控件';
$parent_file = 'demos';

css_enqueue('single-button/sbutton');
css_enqueue('component/jd-tree');
js_enqueue('component/jd-tree');

add_contextual_help($current_screen,
	'<p>这里是一些组件的测试页面</p>' .
	'<p>主要有以下组件：</p>' .
	'<ol>'.
	'<li><strong>单一按钮</strong></li>'.
	'<li><strong>分组树</strong></li>' .
	'</ul>' .
	'<p>' . __('<a href="http://codex.wordpress.org/Dashboard_SubPanel" target="_blank">Dashboard Documentation</a>') . '</p>' .
	'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);

function comp_head(){
	echo 
<<<COMP_HEAD
<script type="text/javascript">
$(function(){
	$("ul.s-button li").click(function(){
		$(this).parent().find('li.current').removeClass('current');
		$(this).addClass('current');
		$(this).find('a').blur();
	})
	.mousedown(function(){
		$(this).addClass('mousedown')
	})
	.mouseup(function(){
		$(this).removeClass('mousedown')
	})
	.mouseout(function(){
		$(this).removeClass('mousedown')
	});
	
	$('#tree').jdTree();
	
});
</script>

<style>
</style>

COMP_HEAD;
}

add_action('head', 'comp_head');

?>
<hr/>
<div style="border:1px solid red;width:40%;min-height:200px;">
	<div id="tree">
		<h6 class="jdtree-parent">工作提醒</h6>
		<ul class="jdtree-children">
			<li><a href="#">制定计划</a></li>
			<li><a href="#">编写测试用例</a></li>
			<li><a href="#">beta1.0上线</a></li>
			<li><a href="#">。。。</a></li>
		</ul>
		<h6 class="jdtree-parent">生活提醒</h6>
		<ul class="jdtree-children">
			<li><a href="#">客人来做客</a></li>
			<li><a href="#">去书店买书</a></li>
			<li><a href="#">请小啬吃饭</a></li>
			<li><a href="#">陪女友逛街</a></li>
			<li><a href="#">。。。</a></li>
		</ul>
	</div>
</div>
<hr/>
<div style="text-align:center;">
<ul class="clearfix s-button tabamount3" style="height:30px;display:inline-block;margin:0 auto;">
	<li class="current first"><a id="accessibletabs1302434475296" class="first"
		href="#accessibletabscontent1302434475296"><span class="current-info">current
				tab: </span>订阅</a></li>
	<li><a href="#accessibletabscontent1302434475296">提醒</a></li>
	<li><a href="#accessibletabscontent1302434475296">提醒提醒提醒提醒提醒提醒提醒提醒</a></li>
	<li><a href="#accessibletabscontent1302434475296">提醒</a></li>
	<li class="last"><a href="#accessibletabscontent1302434475296">事件</a></li>
</ul>
</div>


